package com.eight.travel.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("placeorder")
public class PlaceOrder {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "景点订单id")
    private Integer oid;
    @ApiModelProperty(value = "景点订单编号")
    private String onum;
    @ApiModelProperty(value = "用户id")
    private Integer uid;
    @ApiModelProperty(value = "景区id")
    private Integer pid;
    @ApiModelProperty(value = "下订单时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:s")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:s")
    private Date time;
    @ApiModelProperty(value = "景区门票")
    private Double money;
    @ApiModelProperty(value = "订单状态 0=已下订单,未支付 1=已支付 2=已退订")
    private Integer status;
    @TableField(exist=false)
    @ApiModelProperty(value = "景区名")
    private String placename;
}
